281 research outputs found

    Affine Sessions

    Full text link
    Session types describe the structure of communications implemented by channels. In particular, they prescribe the sequence of communications, whether they are input or output actions, and the type of value exchanged. Crucial to any language with session types is the notion of linearity, which is essential to ensure that channels exhibit the behaviour prescribed by their type without interference in the presence of concurrency. In this work we relax the condition of linearity to that of affinity, by which channels exhibit at most the behaviour prescribed by their types. This more liberal setting allows us to incorporate an elegant error handling mechanism which simplifies and improves related works on exceptions. Moreover, our treatment does not affect the progress properties of the language: sessions never get stuck

    Types for X10 Clocks

    Full text link
    X10 is a modern language built from the ground up to handle future parallel systems, from multicore machines to cluster configurations. We take a closer look at a pair of synchronisation mechanisms: finish and clocks. The former waits for the termination of parallel computations, the latter allow multiple concurrent activities to wait for each other at certain points in time. In order to better understand these concepts we study a type system for a stripped down version of X10. The main result assures that well typed programs do not run into the errors identified in the X10 language reference, namely the ClockUseException. The study will open, we hope, doors to a more flexible utilisation of clocks in the X10 language.Comment: In Proceedings PLACES 2010, arXiv:1110.385

    Deductive Verification of Parallel Programs Using Why3

    Full text link
    The Message Passing Interface specification (MPI) defines a portable message-passing API used to program parallel computers. MPI programs manifest a number of challenges on what concerns correctness: sent and expected values in communications may not match, resulting in incorrect computations possibly leading to crashes; and programs may deadlock resulting in wasted resources. Existing tools are not completely satisfactory: model-checking does not scale with the number of processes; testing techniques wastes resources and are highly dependent on the quality of the test set. As an alternative, we present a prototype for a type-based approach to programming and verifying MPI like programs against protocols. Protocols are written in a dependent type language designed so as to capture the most common primitives in MPI, incorporating, in addition, a form of primitive recursion and collective choice. Protocols are then translated into Why3, a deductive software verification tool. Source code, in turn, is written in WhyML, the language of the Why3 platform, and checked against the protocol. Programs that pass verification are guaranteed to be communication safe and free from deadlocks. We verified several parallel programs from textbooks using our approach, and report on the outcome.Comment: In Proceedings ICE 2015, arXiv:1508.0459

    Modular session types for objects

    Get PDF
    Session types allow communication protocols to be specified type-theoretically so that protocol implementations can be verified by static type checking. We extend previous work on session types for distributed object-oriented languages in three ways. (1) We attach a session type to a class definition, to specify the possible sequences of method calls. (2) We allow a session type (protocol) implementation to be modularized, i.e. partitioned into separately-callable methods. (3) We treat session-typed communication channels as objects, integrating their session types with the session types of classes. The result is an elegant unification of communication channels and their session types, distributed object-oriented programming, and a form of typestate supporting non-uniform objects, i.e. objects that dynamically change the set of available methods. We define syntax, operational se-mantics, a sound type system, and a sound and complete type checking algorithm for a small distributed class-based object-oriented language with structural subtyping. Static typing guarantees that both sequences of messages on channels, and sequences of method calls on objects, conform to type-theoretic specifications, thus ensuring type-safety. The language includes expected features of session types, such as delegation, and expected features of object-oriented programming, such as encapsulation of local state.Comment: Logical Methods in Computer Science (LMCS), International Federation for Computational Logic, 201

    An instance of the MIKADO migration model

    Get PDF
    In this document, we briefly describe the main contribution to the deliverable on experimenting with the implementation of most of the calculi considered in the project. First, we describe how two well known calculi for mobile processes KLAIM and Dπ have been implemented on the top of IMC. We then describe the implementation of the MiKO programming language, an instance of the parametric calculus introduced in the WP1 with the TyCO calculus as the content of the membrane itself. After this, we outline the description of the implementation of the abstract machine for an instance of the Kell Calculus that dedicates particular attention to the proof of its correctness. Our presentation ends with a discussion of the problem of implementing security membranes on the top of an execution platform

    Language Primitives and Type Discipline for Structured Communication-Based Programming Revisited: Two Systems for Higher-Order Session Communication

    Get PDF
    AbstractSession primitives and types provide a flexible programming style for structured interaction, and are used to statically check the safe and consistent composition of protocols in communication-centric distributed software. Unfortunately authors working on session types have recently realised that some of the previously published systems fail to satisfy the basic theorems of Subject Reduction and Type Safety.This report discusses the issues involved in higher-order session communication, presents a formulation of the recursive types as well as proofs of the Subject Reduction and Type Safety Theorems of the original session typing system by Honda-Vasconcelos-Kubo in ESOP'98. It also proposes a variant which allows a more liberal higher-order session communication, based on an idea of Gay and Hole

    The computational content of atomic polymorphism

    Get PDF
    We show that the number-theoretic functions de nable in the atomic polymorphic system (Fat) are exactly the extended polynomials. Two proofs of the above result are presented: one reducing the functions' de n- ability problem in Fat to de nability in the simply typed lambda-calculus and other directly adapting Helmut Schwichtenberg's strategy for de nability in the simply typed lambda-calculus to the atomic polymorphic setting. The uniformity granted in the polymorphic system, when compared with the simply typed lambda-calculus, is emphasized.This work was supported by Fundação para a Ciência e a Tecnologia [UID/MAT/ 04561/2013, UID/CEC/00408/2013 and grant SFRH/BPD/93278/2013 to G.F.]. The first author is also grateful to Centro de Matemática, Aplicações Fundamentais e Investigação Operacional and to Large-Scale Informatics Systems Laboratory (Universidade de Lisboa).info:eu-repo/semantics/publishedVersio

    The role of sanctioning in the evolutionary dynamics of collective action

    Get PDF
    Tese de mestrado em Física, apresentada à Universidade de Lisboa, através da Faculdade de Ciências, 2012Preventing global warming requires overall cooperation. Contributions will depend on the risk of future losses, which plays a key role in decision making. Here, I discuss an evolutionary game theoretical model in which decisions within small groups under high risk and stringent requirements toward success significantly raise the chances of coordinating to save the planet’s climate, thus escaping the tragedy of the commons. I analyze both deterministic dynamics in infinite populations, and stochastic dynamics in finite populations. I also study the impact of different types of sanctioning mechanisms in deterring non-cooperative behavior in climate negotiations, towards the mitigation of the effects of climate change. To this end, I introduce punishment in the collective-risk dilemma and study the dynamics of collective action in finite populations. I show that a significant increase in cooperation is attained whenever individuals have the opportunity to contribute (or not) to institutions that punish free riders. I investigate the impact of having local instead of global sanctioning institutions, showing that the former – which are expected to require less financial resources and which involve agreements between a smaller number of individuals – are more conducive to the prevalence of an overall cooperative behavior. In the optics of evolutionary game theory, the system dynamics is solved by means of a multidimensional stochastic Markov process. The interaction between individuals is not pairwise but it occurs in n-person games; the individuals have perception of the risk and are allowed to explore unpopulated strategies.A prevenção do aquecimento global requer cooperação global. As atuais contribuições dependerão do risco das perdas futuras, desempenhando assim um papel fundamental na tomada de decisões. Nesta tese discuto um modelo teórico para um jogo evolutivo, no qual a tomada de decisões envolvendo grupos pequenos, com alto risco e requisitos rigorosos em direção ao sucesso aumenta significativamente as hipóteses de coordenação para a salvação do clima do planeta, evitando assim a tragédia dos comuns. Tanto a dinâmica determinística em populações infinitas como a dinâmica estocástica em populações finitas são analisadas. Além disto, estudo ainda o impacto de diferentes tipos de mecanismos de sanção para desencorajar o comportamento não cooperativo nas negociações climáticas, de forma a mitigar os efeitos das alterações climáticas. Para este fim, introduzo punição no jogo evolutivo e estudo a dinâmica da ação coletiva em populações finitas. Mostro que um aumento significativo na cooperação ´e alcançado quando os indivíduos têm a oportunidade de contribuir (ou não) para as instituições que punem os chamados “free riders”. Investigo o impacto da conceção de instituições fiscalizadoras locais em vez de instituições globais, mostrando que as primeiras – das quais se espera que exijam menos recursos financeiros e que envolvam acordos entre um número menor de indivíduos – são mais favoráveis para a prevalência de um comportamento global cooperativo. Na ótica da teoria dos jogos evolutiva, a dinâmica do sistema é resolvida por meio de um processo estocástico de Markov multidimensional. A interação entre indivíduos não é entre pares, mas ocorre em jogos de n pessoas, os indivíduos têm perceção do risco e têm a capacidade de explorar estratégias despovoadas

    Dependent Types for Class-based Mutable Objects

    Get PDF
    We present an imperative object-oriented language featuring a dependent type system designed to support class-based programming and inheritance. Programmers implement classes in the usual imperative style, and may take advantage of a richer dependent type system to express class invariants and restrictions on how objects are allowed to change and be used as arguments to methods. By way of example, we implement insertion and deletion for binary search trees in an imperative style, and come up with types that ensure the binary search tree invariant. This is the first dependently-typed language with mutable objects that we know of to bring classes and index refinements into play, enabling types (classes) to be refined by indices drawn from some constraint domain. We give a declarative type system that supports objects whose types may change, despite being sound. We also give an algorithmic type system that provides a precise account of quantifier instantiation in a bidirectional style, and from which it is straightforward to read off an implementation. Moreover, all the examples in the paper have been run, compiled and executed in a fully functional prototype that includes a plugin for the Eclipse IDE
    corecore